<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{$CONF['mallTitle']}后台管理中心</title>
<link href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="__ROOT__/Apps/Admin/View/css/AdminLTE.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 9]>
      <script src="__PUBLIC__/js/html5shiv.min.js"></script>
      <script src="__PUBLIC__/js/respond.min.js"></script>
      <![endif]-->
<script src="__PUBLIC__/js/jquery.min.js"></script>
<script src="__PUBLIC__/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/js/common.js"></script>
<script src="__PUBLIC__/plugins/plugins/plugins.js"></script>
<script src="__PUBLIC__/plugins/formValidator/formValidator-4.1.3.js"></script>
</head>
<script>
   $(function () {
	   $.formValidator.initConfig({
		   theme:'Default',mode:'AutoTip',formID:"myform",debug:true,submitOnce:true,onSuccess:function(){
				   edit();
			       return false;
			},onError:function(msg){
		}});

	   $("#accountSid").formValidator({onShow:"",onFocus:"至少要输入1个字符",onCorrect:"输入正确"}).inputValidator({min:1,max:200,onError:"你输入的长度不正确,请确认"});
	   $("#accountToken").formValidator({onShow:"",onFocus:"至少要输入1个字符",onCorrect:"输入正确"}).inputValidator({min:1,max:200,onError:"你输入的长度不正确,请确认"});
	   $("#appId").formValidator({onShow:"",onFocus:"至少要输入1个字符",onCorrect:"输入正确"}).inputValidator({min:1,max:200,onError:"你输入的长度不正确,请确认"});
	   $("#codeTempId").formValidator({onShow:"",onFocus:"至少要输入1个字符",onCorrect:"输入正确"}).inputValidator({min:1,max:200,onError:"你输入的长度不正确,请确认"});
	   
   });
   function edit(){
	   var params = {};
	   params.id = $('#id').val();
	   params.accountSid = $('#accountSid').val();
	   params.accountToken = $('#accountToken').val();
	   params.appId = $('#appId').val();
	   params.codeTempId = $('#codeTempId').val();
	   params.reodfinishTempId = $('#reodfinishTempId').val();
	   params.resaleTempId = $('#resaleTempId').val();
	   params.odfinishTempId = $('#odfinishTempId').val();
	   params.userSignTempId = $('#userSignTempId').val();
	   params.saleTempId = $('#saleTempId').val();

	   Plugins.waitTips({title:'信息提示',content:'正在提交数据，请稍后...'});
		$.post("{:U('Admin/Sms/edit')}",params,function(data,textStatus){
			var json = MXC.toJson(data);
			if(json.status=='1'){
				Plugins.setWaitTipsMsg({ content:'操作成功',timeout:1000,callback:function(){
				   location.href="{:U('Admin/Sms/toEdit')}";
				}});
			}else{
				Plugins.closeWindow();
				Plugins.Tips({title:'信息提示',icon:'error',content:'操作失败!',timeout:1000});
			}
		});
   }
   </script>
<body class="mxc-page">
<form name="myform" method="post" id="myform">
  <input type='hidden' id='id' value='{$object.id}'/>
  <table class="table table-hover table-striped table-bordered mxc-form">
    <tr>
      <th width='200' align='right'>ACCOUNT SID：<font color='red'>*</font>：</th>
      <td><input type='text' id='accountSid' class="form-control mxc-ipt" value='{$object.accountSid}' maxLength='50'/></td>
    </tr>
    <tr>
      <th width='200' align='right'>AUTH TOKEN：<font color='red'>*</font>：</th>
      <td><input type='text' id='accountToken' class="form-control mxc-ipt" value='{$object.accountToken}' maxLength='50'/></td>
    </tr>
    <tr>
      <th width='200' align='right'>APP ID：<font color='red'>*</font>：</th>
      <td><input type='text' id='appId' class="form-control mxc-ipt" value='{$object.appId}' maxLength='50'/></td>
    </tr>
    <tr>
      <th width='200' align='right'>验证码模板ID<font color='red'>*</font>：</th>
      <td><input type='text' id='codeTempId' class="form-control mxc-ipt" value='{$object.codeTempId}' maxLength='50'/></td>
    </tr>
    <tr>
      <th width='200' align='right'>转售订单结算成功<font color='red'>*</font>：</th>
      <td><input type='text' id='reodfinishTempId' class="form-control mxc-ipt" value='{$object.reodfinishTempId}' maxLength='50'/></td>
    </tr>
    <tr>
      <th width='200' align='right'>转售商品被购买<font color='red'>*</font>：</th>
      <td><input type='text' id='resaleTempId' class="form-control mxc-ipt" value='{$object.resaleTempId}' maxLength='50'/></td>
    </tr>
    <tr>
      <th width='200' align='right'>源头订单结算成功<font color='red'>*</font>：</th>
      <td><input type='text' id='odfinishTempId' class="form-control mxc-ipt" value='{$object.odfinishTempId}' maxLength='50'/></td>
    </tr>
    <tr>
      <th width='200' align='right'>用户确认收货<font color='red'>*</font>：</th>
      <td><input type='text' id='userSignTempId' class="form-control mxc-ipt" value='{$object.userSignTempId}' maxLength='50'/></td>
    </tr>
    <tr>
      <th width='200' align='right'>源头商品被购买<font color='red'>*</font>：</th>
      <td><input type='text' id='saleTempId' class="form-control mxc-ipt" value='{$object.saleTempId}' maxLength='50'/></td>
    </tr>
    <tr>
      <td colspan='2' style='padding-left:250px;'><button type="submit" class="btn btn-success">保&nbsp;存</button>
        <button type="button" class="btn btn-primary" onclick='javascript:location.href="{:U('Admin/Payments/index')}"'>返&nbsp;回</button></td>
    </tr>
  </table>
</form>
</body>
</html>